<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>PHP QrCode Liblary: QRbitstream Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">PHP QrCode Liblary
   &#160;<span id="projectnumber">2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="class_q_rbitstream-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">QRbitstream Class Reference<div class="ingroups"><a class="el" href="group___core_group.html">Standard API Core</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>PHP bit stream.  
 <a href="class_q_rbitstream.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3bed2132f1aec1d11473c284b7321cb3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rbitstream.html#a3bed2132f1aec1d11473c284b7321cb3">size</a> ()</td></tr>
<tr class="separator:a3bed2132f1aec1d11473c284b7321cb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26dcd359ec0216611b9262ae6a66e46a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rbitstream.html#a26dcd359ec0216611b9262ae6a66e46a">allocate</a> ($setLength)</td></tr>
<tr class="memdesc:a26dcd359ec0216611b9262ae6a66e46a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates bit stream, fills bit data stream with 0's.  <a href="#a26dcd359ec0216611b9262ae6a66e46a">More...</a><br/></td></tr>
<tr class="separator:a26dcd359ec0216611b9262ae6a66e46a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9cc1d5520ad4627a4d3b16a368e77922"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rbitstream.html#a9cc1d5520ad4627a4d3b16a368e77922">append</a> (<a class="el" href="class_q_rbitstream.html">QRbitstream</a> $arg)</td></tr>
<tr class="memdesc:a9cc1d5520ad4627a4d3b16a368e77922"><td class="mdescLeft">&#160;</td><td class="mdescRight">Appends given bit stream at end of this stream.  <a href="#a9cc1d5520ad4627a4d3b16a368e77922">More...</a><br/></td></tr>
<tr class="separator:a9cc1d5520ad4627a4d3b16a368e77922"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5d03f44b3b9128350ee6aa6753be37c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rbitstream.html#aa5d03f44b3b9128350ee6aa6753be37c">appendNum</a> ($bits, $num)</td></tr>
<tr class="memdesc:aa5d03f44b3b9128350ee6aa6753be37c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Appends bit stream cteated from given Integer number at end of current stream.  <a href="#aa5d03f44b3b9128350ee6aa6753be37c">More...</a><br/></td></tr>
<tr class="separator:aa5d03f44b3b9128350ee6aa6753be37c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae21d39f33e3e7790c9e0ae5b22e8e9f8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rbitstream.html#ae21d39f33e3e7790c9e0ae5b22e8e9f8">appendBytes</a> ($<a class="el" href="class_q_rbitstream.html#a3bed2132f1aec1d11473c284b7321cb3">size</a>, $data)</td></tr>
<tr class="memdesc:ae21d39f33e3e7790c9e0ae5b22e8e9f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Appends bit stream created from from given byte array at end of current stream.  <a href="#ae21d39f33e3e7790c9e0ae5b22e8e9f8">More...</a><br/></td></tr>
<tr class="separator:ae21d39f33e3e7790c9e0ae5b22e8e9f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ba0e056a37d94117765805b6b0dda3f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rbitstream.html#a2ba0e056a37d94117765805b6b0dda3f">toByte</a> ()</td></tr>
<tr class="memdesc:a2ba0e056a37d94117765805b6b0dda3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts current bit stream into byte array.  <a href="#a2ba0e056a37d94117765805b6b0dda3f">More...</a><br/></td></tr>
<tr class="separator:a2ba0e056a37d94117765805b6b0dda3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ae0f2635a1ecee89743d84521d327db26"><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rbitstream.html#ae0f2635a1ecee89743d84521d327db26">newFromNum</a> ($bits, $num)</td></tr>
<tr class="memdesc:ae0f2635a1ecee89743d84521d327db26"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates new bit stream from given Integer number.  <a href="#ae0f2635a1ecee89743d84521d327db26">More...</a><br/></td></tr>
<tr class="separator:ae0f2635a1ecee89743d84521d327db26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41e1ac909190d30c8810e1b8c791d89c"><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rbitstream.html#a41e1ac909190d30c8810e1b8c791d89c">newFromBytes</a> ($<a class="el" href="class_q_rbitstream.html#a3bed2132f1aec1d11473c284b7321cb3">size</a>, $data)</td></tr>
<tr class="memdesc:a41e1ac909190d30c8810e1b8c791d89c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates new bit stream from given byte array.  <a href="#a41e1ac909190d30c8810e1b8c791d89c">More...</a><br/></td></tr>
<tr class="separator:a41e1ac909190d30c8810e1b8c791d89c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a7935641de8cb51441d943fb5d4d377c9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7935641de8cb51441d943fb5d4d377c9"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rbitstream.html#a7935641de8cb51441d943fb5d4d377c9">$data</a> = array()</td></tr>
<tr class="memdesc:a7935641de8cb51441d943fb5d4d377c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Array containing bit data stream. <br/></td></tr>
<tr class="separator:a7935641de8cb51441d943fb5d4d377c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>PHP bit stream. </p>
<p>Class implementing array of bits (= 1 or 0 ints). Allows to initialize and append bits from given Integer or array of Bytes. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a26dcd359ec0216611b9262ae6a66e46a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRbitstream::allocate </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$setLength</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocates bit stream, fills bit data stream with 0's. </p>
<p>This operation is <b>destructive</b>, will replace orginal stream contents! </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">Integer</td><td class="paramname">$setLength</td><td>desired target stream size </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Integer 0 on success, other on failure </dd></dl>

</div>
</div>
<a class="anchor" id="a9cc1d5520ad4627a4d3b16a368e77922"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRbitstream::append </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_q_rbitstream.html">QRbitstream</a>&#160;</td>
          <td class="paramname"><em>$arg</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Appends given bit stream at end of this stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype"><a class="el" href="class_q_rbitstream.html" title="PHP bit stream. ">QRbitstream</a></td><td class="paramname">$arg</td><td>bit stream to be appended </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Integer status of append operation, 0 when success, -1 when $arg is null </dd></dl>

</div>
</div>
<a class="anchor" id="ae21d39f33e3e7790c9e0ae5b22e8e9f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRbitstream::appendBytes </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Appends bit stream created from from given byte array at end of current stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">Integer</td><td class="paramname">$size</td><td>size of array </td></tr>
    <tr><td class="paramtype">Array</td><td class="paramname">$data</td><td>array ob bytes </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Integer status of append operation, status of append operation, 0 when success, -1 otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="aa5d03f44b3b9128350ee6aa6753be37c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRbitstream::appendNum </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$bits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$num</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Appends bit stream cteated from given Integer number at end of current stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">Integer</td><td class="paramname">$bits</td><td>bit count </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$num</td><td>integer to convert </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Integer status of append operation, status of append operation, 0 when success, -1 otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="a41e1ac909190d30c8810e1b8c791d89c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static QRbitstream::newFromBytes </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates new bit stream from given byte array. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">Integer</td><td class="paramname">$size</td><td>size of array </td></tr>
    <tr><td class="paramtype">Array</td><td class="paramname">$data</td><td>array ob bytes </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_q_rbitstream.html" title="PHP bit stream. ">QRbitstream</a> bit stream object containing bit contents of given bytes array </dd></dl>

</div>
</div>
<a class="anchor" id="ae0f2635a1ecee89743d84521d327db26"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static QRbitstream::newFromNum </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$bits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$num</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates new bit stream from given Integer number. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">Integer</td><td class="paramname">$bits</td><td>bit count </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$num</td><td>integer to convert </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_q_rbitstream.html" title="PHP bit stream. ">QRbitstream</a> bit stream object containing first $bits bits from $num in order from LSB to MSB </dd></dl>

</div>
</div>
<a class="anchor" id="a3bed2132f1aec1d11473c284b7321cb3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRbitstream::size </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Integer size of byte stream </dd></dl>

</div>
</div>
<a class="anchor" id="a2ba0e056a37d94117765805b6b0dda3f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRbitstream::toByte </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Converts current bit stream into byte array. </p>
<dl class="section return"><dt>Returns</dt><dd>Array array of bytes </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>lib/full/qrbitstream.php</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun May 26 2013 14:47:13 for PHP QrCode Liblary by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>
